# import numpy as np
#
# # # 读取原输入图片和标签文件
# # input_image_data = np.load('trainpy/images/case0005_slice000.npy')
# # label_data = np.load('trainpy/labels/case0005_slice000.npy')
# #
# # # 合并为一个npz文件
# # np.savez('trainpy/NPZ/data.npz', image=input_image_data, label=label_data)
#
# # 读取合并后的npz文件
# data = np.load('data/Synapse/train_npz/123.npz')
#
# # 从合并后的文件中读取原始图片和标签数据
# input_image = data['image']
# label = data['label']
#
# # 示例输出数据的形状
# print("原始输入图片数据形状:", input_image.shape)
# print("标签数据形状:", label.shape)




# import os
# import numpy as np
#
# input_image_folder = 'trainpy/images'
# label_folder = 'trainpy/labels'
#
# input_image_files = sorted([os.path.join(input_image_folder, f) for f in os.listdir(input_image_folder) if f.endswith('.npy')])
# label_files = sorted([os.path.join(label_folder, f) for f in os.listdir(label_folder) if f.endswith('.npy')])
#
# count = 0
#
# for input_image_file, label_file in zip(input_image_files, label_files):
#
#     input_image_data = np.load(input_image_file)
#     label_data = np.load(label_file)
#
#     np.savez(f'data/Synapse/train_npz/{count}.npz', image=input_image_data, label=label_data)
#
#     count += 1


# import os
#
# # 文件夹路径
# folder_path = 'data/Synapse/train_npz'
#
# # 获取文件夹中所有文件的名字（不包含后缀）
# file_names = [os.path.splitext(file)[0] for file in os.listdir(folder_path)]
#
# # 打印文件名
# for name in file_names:
#     print(name)

# import h5py
# import os
# # 加载 .npy.h5 文件
# file_path = 'data/Synapse/test_vol_h5/case0003.npy.h5'
# with h5py.File(file_path, 'r') as hf:
#     # 获取数组的形状
#     shape = hf['label'].shape
#
# print("数组的形状为:", shape)
import numpy as np

print(np.__version__)